﻿@if (typeof(Inovout.Data.Domain.DataObject).IsAssignableFrom(Html.ViewData.ModelMetadata.ModelType) &&
    Model != null && !((Inovout.Data.Domain.DataObject)Model).IsTransient)
{
    @Html.Hidden("Id")
}
@foreach (var property in Html.ViewData.ModelMetadata.Properties)
{
    <div class="row form-group">
        @Html.Label(property.PropertyName, new { @class = "col-xs-4 control-label" })
        <div class="col-xs-5">
            @Html.Editor(property.PropertyName, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessage(property.PropertyName)
        </div>
    </div>
}